package java0107;

import java.util.Map;
import java.util.TreeMap;

public class Java06 {
    public static void main(String[] args) {

        //(6)Map集合：TreeMap排序，注意：按照key排序

        Map<Integer,String> map = new TreeMap<Integer,String>();
        map.put(2,"b");
        map.put(1,"c");
        map.put(3,"a");
        map.forEach((k,v)->{
            System.out.println(k + "\t" + v);
        });

    }
}
